-
Notifications
You must be signed in to change notification settings - Fork 2.5k
feat(sort): change sort priority indicator to only show when multiple columns are sorted #4876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(sort): change sort priority indicator to only show when multiple columns are sorted #4876
Conversation
This should be toggleable with a setting. Also this will conflict with #4807 (but I guess I'll have to take care of that) |
8cdfbbe
to
8a544e8
Compare
What should the name of the setting be? hideSingleColumnSortIndicator? I'm still having a hard time seeing why anyone would turn this off. Are there any other examples of grids that show numeric sort indicators like this when only one column is sorted? |
@JLLeitschuh I agree with the comment above. Is there a reason we need to always show a sort indicator of 1 if there is only one column sorted? |
8a544e8
to
67247c0
Compare
change sort priority indicator to only show when multiple columns are sorted
67247c0
to
7725eac
Compare
So does someone need to make a decision? |
I like this idea. If more than 1 sort is provided, add numbers, (indexing at 1) otherwise do not show priority |
Okay, this makes sense. I see no problem with merging this. |
feat(sort): change sort priority indicator to only show when multiple columns are sorted
There is something off with this solution. I just pulled 3.1.0 down to test this.
|
The reason this is not working properly is because in ui-grid-header-cell.js you are testing for:
but if element.sort.priority === 0 then this condition is returning 0 which will result with |
@JLLeitschuh where is your fix to index sort.priority at 1 instead of 0? If this went in, then the condition above would resolve to true and there would be no bug |
feat(sort): change sort priority indicator to only show when multiple columns are sorted
Sort priority number indicators were added with #4257. These look strange when only one column is sorted. This pull request changes the indicators to only display when multiple columns are sorted.
fixes #4503